package com.example.dairenkun.neufoodshop.model;

import com.example.dairenkun.neufoodshop.bean.Shop;
import com.example.dairenkun.neufoodshop.service.ShopService;

import java.util.List;

import retrofit2.Call;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;

/**
 * Created by Administrator on 2017/5/8.
 */

public class ShopModel {
    Retrofit retrofit;
    public ShopModel(){
        retrofit=new Retrofit.Builder()
                .addConverterFactory(GsonConverterFactory.create())
                .baseUrl("http://60.205.189.39/")
                .build();
    }
    public Call ShopList(){
        ShopService testService=retrofit.create(ShopService.class);
        return testService.getAllShop();
    }
    //获取店铺详情
    public Call ShopDetail(int shopid){
        ShopService testService=retrofit.create(ShopService.class);
        return testService.getShopDetail(shopid);
    }
}
